<!DOCTYPE html>
<html>

<head>

    {include file="common:meta"}

</head>
<style>
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">

    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">

                <div class="ibox-content">
                    <form method="" class="form-horizontal" id="form" action="">

                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="u_id">
                                <span class="c-red">*</span>代理ID：
                            </label>
                            <div class="col-md-2 col-sm-10">
                                <input type="number" class="form-control" id="u_id" name="u_id"  value="{$agentUser.u_id}">
                            </div>
                        </div>

                        <input type="hidden" name="id" value="{$agentUser.id}">

                        <div class="form-group">
                            <label class="col-sm-2 control-label" >
                                <span class="c-red">*</span>切换模式：
                            </label>
                            <div class="col-md-2 col-sm-10">
                                <div class="radio i-checks">
                                    {if ( $agentUser.status == 1) }
                                    <label><input type="radio"  name="status" value="1" checked> <i></i>使用</label>
                                    <label><input type="radio" name="status"  value="2"> <i></i>禁用</label>
                                    {else /}
                                    <label><input type="radio"  name="status" value="1" > <i></i>使用</label>
                                    <label><input type="radio" name="status"  value="2" checked> <i></i>禁用</label>
                                    {/if}
                                </div>
                            </div>
                        </div>
                        <div class="form-group has-success">
                            <div class="col-sm-4 col-sm-offset-2">
                                <input class="btn btn-primary" id="btn-submit" type="button" value="提交">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="common:footer"}
<script>
    $('#btn-submit').click(function(){
        $.ajax({
            type:'post',
            url:'/AgentUserEditData',
            async:true,
            data:$('#form').serialize(),
            dataType:'json',
            success:function(result){
                if(result.code == 100){
                    layer.msg(result.msg,{
                        icon:1,
                        time:1000
                    });
                }
                else{
                    layer.msg(result.msg,{
                        icon:2,
                        time:1000
                    });
                }
            },
            error:function(err){
                layer.msg('服务器开小差了！',{
                    time:1500
                });
            }
        });
    });
    //时间搜索插件
</script>
</body>

</html>